 /**
 * @(#) StartupCommand.as
 *
 * @date		2009. 02. 04.
 * @version		1.0
 * @author		Shin, Yunwoo
 * @description	Application 시작을 처리하는 Command
 * 				 
 */
package com.skt.common_hr.myprofile.controller
{
	import com.skt.common_hr.myprofile.model.CareerProxy;
	import com.skt.common_hr.myprofile.model.FamilyProxy;
	import com.skt.common_hr.myprofile.model.LicenseProxy;
	import com.skt.common_hr.myprofile.model.PassWordCheckProxy;
	import com.skt.common_hr.myprofile.model.PersonalProxy;
	import com.skt.common_hr.myprofile.model.ProfileDetailProxy;
	import com.skt.common_hr.myprofile.model.ProfileProxy;
	import com.skt.common_hr.myprofile.model.ScholarshipProxy;
	import com.skt.common_hr.myprofile.model.SkCareerProxy;
	import com.skt.common_hr.myprofile.view.MyProfileMediator;
	import com.skt.common_hr.myprofile.view.PassWordCheckMediator;
	
	import org.puremvc.as3.multicore.interfaces.ICommand;
	import org.puremvc.as3.multicore.interfaces.INotification;
	import org.puremvc.as3.multicore.patterns.command.SimpleCommand;

	public class StartupCommand extends SimpleCommand implements ICommand
	{
		
		override public function execute(note:INotification):void
		{
			var app:MyProfile = note.getBody() as MyProfile;
			//trace("execute startupCommand");
			
			facade.registerProxy(new ProfileProxy());
			facade.registerProxy(new ProfileDetailProxy());
			facade.registerProxy(new PassWordCheckProxy());
			
			// MVC 모델중 View와 관련한 mediator들을 등록한다.
			facade.registerMediator(new MyProfileMediator(app.overView));
			facade.registerMediator(new PassWordCheckMediator(app.overView.checkView));
			
			facade.registerProxy(new ProfileProxy());
			facade.registerProxy(new ProfileDetailProxy());
			facade.registerProxy(new PersonalProxy());
			facade.registerProxy(new SkCareerProxy());
			facade.registerProxy(new CareerProxy());
			facade.registerProxy(new FamilyProxy());
			facade.registerProxy(new ScholarshipProxy());
			facade.registerProxy(new LicenseProxy());
			facade.registerProxy(new PassWordCheckProxy());
			
		}
	}
}